﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserInfo.aspx.cs" Inherits="RaceList.activity.mhalloween.UserInfo" %>

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />

        <title>领奖中心</title>

        <meta name="keywords" content="">
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no" />

        <link href="style/layout.css" rel="stylesheet" />
        <script src="js/jquery-1.9.1.min.js"></script>


    </head>
    <body>
        <section id="web_wrap">
            <!-- 页面框架 -->
            <div class="container">
                <div class="bg_box">
                    <a href="<%=SessionHelp.IndexUrl %>" class="rule_backhome">返回游戏首页</a>

                    <div class="prize_con">

                        <!-- 领奖中心 -->
                        <div class="prize_text">
                            <h4><i></i>领奖中心</h4>

                            <h5><%= Content %></h5>
                        </div>
                        <div class="prize_text" runat="server" id="divSubmit" visible="false">
                            <h5>领奖信息：</h5>
                            <form runat="server">
                                <div class="prizeInput"><span>姓名：</span><asp:TextBox runat="server" ID="txtName" /></div>
                                <div class="prizeInput"><span>手机号：</span><asp:TextBox runat="server" ID="txtPhone" /></div>
                                <div class="prizeInput"><span>身份证后四位：</span><asp:TextBox runat="server" ID="txtCode" MaxLength="4"/></div>
                                <div class="prizeInput">
                                    <asp:Button runat="server" Text="提交" CssClass="subBtn"  OnClick="Submit_Click"/>
                                </div>
                            </form>
                            <p>奖品领取方式将于<b>2015年10月29日</b>公布，请留意本活动页面及北京欢乐谷官方网站、微博、微信公众号。</p>
                        </div>

                        <!-- 领奖信息 -->
                        <div class="prize_text">
                            <h5>游戏奖项设置：</h5>

                            <p>一等奖：共1名，单人行年卡1张</p>
                            <p>二等奖：共10名，北京欢乐谷日场入园名额2个（共计20个）</p>
                            <p>三等奖：共50名，北京欢乐谷夜场入园名额2个（共计100个）</p>
                            <p>还有更多神秘惊喜奖品，赶快来玩游戏吧！</p>
                        </div>


                        <a href="<%=SessionHelp.IndexUrl %>">返回游戏首页</a>
                    </div>


                    <div class="clear"></div>
                </div>




            </div>



        </section>





    </body>
</html>
<script src="js/main2.js"></script>
<script>
    var txtCode = $("#");
    var txtName = $("#");
    var txtPhone = $("#");
    $(function() {
        txtCode.on('focus', function() {
            Award();
        });
        txtCode.on('blur', function() {
            Award();
        });

        function Award() {
            if (txtCode.val().trim().length == 16) {
                $.post('Award.ashx', { m: 'CheckCode', code: txtCode.val().trim() }, function(data) {
                    if (data.status != 200) {
                        $('#userinfo').hide();
                        alert(data.message);
                    } else {
                        txtName.val(data.name);
                        txtPhone.val(data.phone);
                        $('#userinfo').show();
                    }
                }, 'JSON');
            }
        }
    });

    function Validate() {
        if (txtCode.val().trim() == "") {
            txtCode.css("border-color", "red");
            txtCode.focus();
            return false;
        }
        if (txtName.val().trim() == "") {
            txtName.css("border-color", "red");
            txtName.focus();
            return false;
        }
        if (txtPhone.val().trim() == "") {
            txtPhone.css("border-color", "red");
            txtPhone.focus();
            return false;
        }
        return true;
    }
</script>